package com.cloud.nacosprovider.controller;

import com.cloud.nacosprovider.config.ServerConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author kangwen
 */
@RestController
public class ProviderController {

	@Autowired
	private ServerConfig serverConfig;
	private static Logger logger = LoggerFactory.getLogger(ProviderController.class);

	@GetMapping("/hello")
	public String hi() {
		logger.info("请求到当前系统:{}", serverConfig.getPort());
		return "hi i'm nacos provider on port " + serverConfig.getPort();
	}
}